<template>
    <div>
        证书列表
        <template>
            <el-tabs v-model="activeName" @tab-click="handleClick">
                <el-tab-pane label="建设用地规划许可证" name="jsyd">
                    <credentialsTable v-if="tabName == 'jsyd'" :typeid="5" :project_id="project_id"></credentialsTable>
                </el-tab-pane>
                <el-tab-pane label="土地出让合同信息" name="tdcr">
                    <credentialsTable v-if="tabName == 'tdcr'" :typeid="2" :project_id="project_id"></credentialsTable>
                </el-tab-pane>
                <el-tab-pane label="固定资产核准证/项目核准批复信息" name="gdzc">
                    <credentialsTable v-if="tabName == 'gdzc'" :typeid="1" :project_id="project_id"></credentialsTable>

                </el-tab-pane>
                <el-tab-pane label="国有土地使用证信息" name="gytd">
                    <credentialsTable v-if="tabName == 'gytd'" :typeid="4" :project_id="project_id"></credentialsTable>
                </el-tab-pane>
                <el-tab-pane label="不动产权证书" name="bdcq">
                    <credentialsTable v-if="tabName == 'bdcq'" :typeid="3" :project_id="project_id"></credentialsTable>
                </el-tab-pane>
                <el-tab-pane label="建设工程规划许可证" name="jsgc">
                    <credentialsTable v-if="tabName == 'jsgc'" :typeid="6" :project_id="project_id"></credentialsTable>
                </el-tab-pane>
                <el-tab-pane label="建筑工程施工许可证" name="jzgc">
                    <credentialsTable v-if="tabName == 'jzgc'" :typeid="7" :project_id="project_id"></credentialsTable>
                </el-tab-pane>
                <el-tab-pane label="预售许可证信息" name="ysxk">
                    <credentialsTable v-if="tabName == 'ysxk'" :typeid="8" :project_id="project_id"></credentialsTable>
                </el-tab-pane>
                <el-tab-pane label="竣工验收备案证明书" name="jgys">
                    <credentialsTable v-if="tabName == 'jgys'" :typeid="9" :project_id="project_id"></credentialsTable>
                </el-tab-pane>
            </el-tabs>
        </template>
    </div>
</template>
  
<script>
import ProjectApi from '@/api/project'

import credentialsTable from './credentialsTable.vue'
export default {
    components: {
        credentialsTable,
    },
    data() {
        return {
            activeName: 'jsyd',
            typeid: '',
            project_info: [],
            tabName:'jsyd',

            isShow: true,//默认值，默认显示第一个tab
            isShow2: false,//默认值
        };
    },
    methods: {
        handleClick(tab, event) {
            this.tabName = tab.name
        },
        getCredential() {
            // ProjectApi.detailProject(this.project_id).then(response => {

            // })
        }

    },
    props: {
        'project_id': String,

    },
    created() {
        this.getCredential();
    },

};
</script>
  
<style></style>